const key = 'xtx-userInfo'
import {Profile } from '@/types/user'
// 存储用户信息
export const setUserInfo= (userInfo:Profile)=>{
  localStorage.setItem(key,JSON.stringify(userInfo))
}
// 获取用户信息
export const getUserInfo = ()=>{
  return JSON.parse(JSON.stringify(localStorage.getItem(key||'{}')))
}
export const removeUserInfo = ()=>{
  localStorage.removeItem(key)
}